home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
auto_cad
/
imdemo2.exe
/
IMINSTAL.LSP
< prev
next >
Wrap
Text File
|
1990-10-15
|
9KB
|
189 lines
; IMINSTAL (DEMO) V 2.0 for use with INSERT MANAGER
; COPYRIGHT (c) 1989, 1990 CADD Masters
; ALL RIGHTS RESERVED
;
(defun insterr (st)
(terpri)
(prompt (strcat "\nINSERT MANAGER INSTALLATION - Error: " st))
(setq *error* olderr1)
)
(defun strpos (obj tar / lobj ltar pos)
(setq lobj (strlen obj))
(setq ltar (strlen tar))
(setq pos 1)
(while (and (<= pos ltar) (/= obj (substr tar pos lobj)))
(setq pos (+ pos 1))
)
(if (> pos ltar)
(setq pos 0)
)
pos
)
(defun c:iminstal (/ libry symbdir imdir response fin fold fnew l datline mnunm mnudir imdrv ansr ansr2 fout)
(setq olderr1 *error* *error* insterr)
(setvar "cmdecho" 0)
(setvar "limcheck" 0)
(if (equal (getvar "acadver") "10 c2")
(setvar "flatland" 0)
)
(setq libry "IMDEMO")
(command "vslide" "a:im")
(getstring "\nPress enter to continue . . .")
(command "sh" "cls")
(prompt "\n******************** IMINSTAL VERSION 2.0 *************************")
(prompt "\n**** (c) COPYRIGHT CADD Masters 1989, 1990 ALL RIGHTS RESERVED ****")
(setq imdrv (substr (getvar "dwgprefix") 1 2))
(setq symbdir (strcat imdrv "\\IMDEMO"))
(setq imdir (strcat imdrv "\\IM"))
(prompt (strcat "\nReady to copy INSERT MANAGER and " libry " symbol files to"))
(prompt (strcat "\n" imdir " and " symbdir " and " symbdir "\\MTRX."))
(setq response (getstring "\nPress G to go or any other key to quit . . ."))
(if (/= response "")
(setq response (strcase response))
)
(if (= response "G")
(progn
(command "sh" (strcat "md " symbdir))
(command "sh" (strcat "md " symbdir "\\MTRX"))
(command "sh" (strcat "md " imdir))
(command "shell" (strcat "a:\\pkunzip a:\\" libry "\\" libry " " symbdir)); extract archive
(command "shell" (strcat "a:\\pkunzip a:\\im\\im " imdir))
(command "shell" (strcat "a:\\pkunzip a:\\" libry "\\MTRX\\MTRX " symbdir "\\MTRX"))
(setq fout (open (strcat symbdir "\\MTRX\\imdemo.dat") "w"))
(write-line "639.000000000" fout)
(write-line "414.000000000" fout)
(write-line "-5.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\CAP") fout)
(write-line "-3.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\CHOKE") fout)
(write-line "-1.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\BATT") fout)
(write-line "1.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FF-D") fout)
(write-line "3.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\DIO") fout)
(write-line "5.0 4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\RES") fout)
(write-line "-5.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\INV") fout)
(write-line "-3.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\LEDF") fout)
(write-line "-1.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\NAND-3") fout)
(write-line "1.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\DAT-D") fout)
(write-line "3.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\DAT-E") fout)
(write-line "5.0 2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\SYM") fout)
(write-line "-5.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FCS") fout)
(write-line "-3.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FCS3") fout)
(write-line "-1.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FCS3LONG") fout)
(write-line "1.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FCS3SYM") fout)
(write-line "3.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\IN3SYM") fout)
(write-line "5.0 0.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FCS4SYM") fout)
(write-line "-5.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\BACKMATR") fout)
(write-line "-3.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\DBGV") fout)
(write-line "-1.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\DOUBLE-U") fout)
(write-line "1.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\FLAGRITE") fout)
(write-line "3.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\PART-V") fout)
(write-line "5.0 -2.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\PARTVOS") fout)
(write-line "-5.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\SBEVBWAS") fout)
(write-line "-3.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\SBEVBWOS") fout)
(write-line "-1.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\WTLEFT") fout)
(write-line "1.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\WTRITE") fout)
(write-line "3.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\SQRGRVAS") fout)
(write-line "5.0 -4.0" fout)
(write-line (strcat imdrv "\\IMDEMO\\SQRGRVOS") fout)
(close fout)
(terpri)
(prompt (strcat "\nAll symbols (.DWG) copied to " symbdir))
(prompt (strcat "\nAll INSERT MANAGER utilities (.LSP) copied to " imdir))
(prompt (strcat "\nAll matrix files (.DAT, .SLD, .DWG) copied to " symbdir "\\MTRX"))
(setq response (getstring "\nDo you want an INSERT MANAGER pull down menu (**POP10)? (Y/N):"))
(if (/= response "")
(setq response (strcase response))
)
(if (equal response "Y")
(progn
(setq mnunm (getstring (strcat "\nWhat is the name of your menu (drive & directory required)? <" (getvar "menuname") ".MNU" ">: ")))
(if (/= mnunm "")
(setq mnunm (strcase mnunm))
)
(if (equal mnunm "")
(setq mnunm (strcat (getvar "menuname") ".MNU"))
)
(setq ansr "Y")
(while (and (= ansr "Y") (not (setq fin (open mnunm "r"))))
(prompt (strcat "\n" mnunm " not found!"))
(setq ansr (getstring "\nTry again? (<Y>/N): "))
(if (/= ansr "")
(setq ansr (strcase ansr))
)
(if (or (= ansr "Y") (= ansr ""))
(progn
(setq ansr "Y")
(setq mnunm (getstring (strcat "\nWhat is the name of your menu (drive & directory required)? <" (getvar "menuname") ".MNU" ">: ")))
(if (/= mnunm "")
(setq mnunm (strcase mnunm))
)
(if (equal mnunm "")
(setq mnunm (strcat (getvar "menuname") ".MNU"))
)
)
)
)
(if fin
(progn
(close fin)
(prompt (strcat "\nReady to modify " mnunm " and create INSERT MANAGER menu **POP10."))
(setq response (getstring "\nPress G to go or any other key to quit . . ."))
(if (/= response "")
(setq response (strcase response))
)
(if (equal response "G")
(progn
(command "shell" (strcat "a:\\makemnu " mnunm " " imdrv))
(command "menu" (substr mnunm 1 (- (strlen mnunm) 4)))
)
)
)
)
)
)
(textscr)
(getstring "\nInstallation complete. Press a key to continue . . .")
)
)
(setq ansr (getstring "\nDo you wish to preview the BONUS SLIDES? (<Y>/N): "))
(if (/= ansr "")
(setq ansr (strcase ansr))
)
(if (or (= ansr "Y") (= ansr ""))
(preview)
)
(setq *error* olderr1)
(command "redraw")
(prin1)
)